Skip to content

Conversation

@StevenReitsma
Copy link
Contributor

Closes #5171

📑 Description

When using the Keep provider to create alerts in a foreach loop, all generated alerts may end up sharing the same (often last) data, especially if the alert template contains nested structures (such as dictionaries or lists). Replace the shallow copy with a deep copy to ensure that each alert in the loop gets a fully independent copy of the template, including all nested structures.

Thanks to @akipham15 for the research in #5171

✅ Checks

  • My pull request adheres to the code style of this project
  • My code requires changes to the documentation
  • I have updated the documentation as required
  • All the tests have passed

ℹ Additional Information

n/a

@vercel
Copy link

vercel bot commented Oct 7, 2025

@StevenReitsma is attempting to deploy a commit to the KeepHQ Team on Vercel.

A member of the Team first needs to authorize it.

@dosubot dosubot bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Oct 7, 2025
@CLAassistant
Copy link

CLAassistant commented Oct 7, 2025

CLA assistant check
All committers have signed the CLA.

@dosubot dosubot bot added Bug Something isn't working Provider Providers related issues labels Oct 7, 2025
Copy link
Member

@talboren talboren left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Oct 29, 2025
@talboren talboren merged commit 8fa45ae into keephq:main Oct 29, 2025
5 of 6 checks passed
@github-actions
Copy link
Contributor

💪 Fantastic work @StevenReitsma! Your very first PR to keep has been merged! 🎉🥳

You've just taken your first step into open-source, and we couldn't be happier to have you onboard. 🙌
If you're feeling adventurous, why not dive into another issue and keep contributing? The community would love to see more from you! 🚀

For any support, feel free to reach out on the community: https://slack.keephq.dev. Happy coding! 👩‍💻👨‍💻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Something isn't working lgtm This PR has been approved by a maintainer Provider Providers related issues size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[🐛 Bug]: Keep Provider: Alerts in foreach loop share data due to shallow copy (copy.copy instead of copy.deepcopy)

3 participants